/*
 *    jQuery carouFredSel 6.2.1
 *    Demo's and documentation:
 *    caroufredsel.dev7studios.com
 *
 *    Copyright (c) 2013 Fred Heusschen
 *    www.frebsite.nl
 *
 *    Dual licensed under the MIT and GPL licenses.
 *    http://en.wikipedia.org/wiki/MIT_License
 *    http://en.wikipedia.org/wiki/GNU_General_Public_License
 */
(function(l){function ma(a,c,d){"transition"==d.transition&&"swing"==c&&(c="ease");return{anims:[],duration:a,orgDuration:a,easing:c,startTime:J()}}function fa(a,c){for(var d=0,m=a.anims.length;d<m;d++){var e=a.anims[d];if(e)e[0][c.transition](e[1],a.duration,a.easing,e[2])}}function na(a,c){u(c)||(c=!0);z(a.pre)&&na(a.pre,c);for(var d=0,m=a.anims.length;d<m;d++){var e=a.anims[d];e[0].stop(!0);if(c&&(e[0].css(e[1]),t(e[2])))e[2]()}z(a.post)&&na(a.post,c)}function Ha(a,c,d){c&&c.remove();switch(d.fx){case "fade":case "crossfade":case "cover-fade":case "uncover-fade":a.css("opacity",
1),a.css("filter","")}}function oa(a,c,d,m,e){c[d]&&c[d].call(a,m);if(e[d].length){c=0;for(var l=e[d].length;c<l;c++)e[d][c].call(a,m)}return[]}function Ia(a,c,d){c.length&&(a.trigger(e(c[0][0],d),c[0][1]),c.shift());return c}function Ja(a){a.each(function(){var a=l(this);a.data("_cfs_isHidden",a.is(":hidden")).hide()})}function Ka(a){a&&a.each(function(){var a=l(this);a.data("_cfs_isHidden")||a.show()})}function ga(a){a.auto&&clearTimeout(a.auto);a.progress&&clearInterval(a.progress);return a}function La(a,
c,d,m,e,l,n){return{width:n.width,height:n.height,items:{old:a,skipped:c,visible:d},scroll:{items:m,direction:e,duration:l}}}function Ma(a,c,d,m){var e=a.duration;if("none"==a.fx)return 0;"auto"==e?e=c.scroll.duration/c.scroll.items*d:10>e&&(e=m/e);if(1>e)return 0;"fade"==a.fx&&(e/=2);return Math.round(e)}function wa(a,c,d){var m=p(a.items.minimum)?a.items.minimum:a.items.visible+1;"show"!=c&&"hide"!=c&&(m>c?(x(d,"Not enough items ("+c+" total, "+m+" needed): Hiding navigation."),c="hide"):c="show");
m="show"==c?"removeClass":"addClass";d=E("hidden",d);if(a.auto.button)a.auto.button[c]()[m](d);if(a.prev.button)a.prev.button[c]()[m](d);if(a.next.button)a.next.button[c]()[m](d);if(a.pagination.container)a.pagination.container[c]()[m](d)}function ha(a,c,d){if(!a.circular&&!a.infinite){var m="removeClass"==c||"addClass"==c?c:!1;d=E("disabled",d);if(a.auto.button&&m)a.auto.button[m](d);if(a.prev.button)a.prev.button[m||0==c?"addClass":"removeClass"](d);a.next.button&&(c=m||c==a.items.visible?"addClass":
"removeClass",a.next.button[c](d))}}function pa(a,c){t(c)?c=c.call(a):w(c)&&(c={});return c}function xa(a,c){c=pa(a,c);if(v(c)){var d=qa(c);c=-1==d?l(c):d}return c}function Na(a,c){c=xa(a,c);I(c)?c={button:c}:p(c)&&(c={key:c});return c}function Oa(a,c){t(c.button)&&(c.button=c.button.call(a));v(c.button)&&(c.button=l(c.button));v(c.key)&&(c.key=qa(c.key));return c}function P(a,c,d,m,e){v(a)&&(a=l(a,e));z(a)&&(a=l(a,e));I(a)?(a=e.children().index(a),u(d)||(d=!1)):u(d)||(d=!0);p(a)||(a=0);p(c)||(c=
0);d&&(a+=m.first);a+=c;if(0<m.total){for(;a>=m.total;)a-=m.total;for(;0>a;)a+=m.total}return a}function ya(a,c,d){for(var m=0,e=0;0<=d;d--){var l=a.eq(d),m=m+(l.is(":visible")?l[c.d.outerWidth](!0):0);if(m>c.maxDimension)return e;0==d&&(d=a.length);e++}}function Pa(a,c,d,m){for(var e=0,l=0,n=a.length;0<=m;m--){l++;if(l==n||a.eq(m).is(c)&&(e++,e==d))return l;0==m&&(m=n)}}function Qa(a,c){return c.items.visibleConf.org||a.children().slice(0,c.items.visible).filter(c.items.filter).length}function da(a,
c,d){for(var m=0,e=0,l=a.length-1;d<=l;d++){var n=a.eq(d),m=m+(n.is(":visible")?n[c.d.outerWidth](!0):0);if(m>c.maxDimension)return e;e++;if(e==l+1)return e;d==l&&(d=-1)}}function Ra(a,c,d,m){a=da(a,c,d);c.circular||d+a>m&&(a=m-d);return a}function ra(a,c,d){return Sa(a,c.items.filter,c.items.visibleConf.org,d,c.circular)}function Sa(a,c,d,m,e){for(var l=e=0,n=a.length-1;m<=n;m++){l++;if(l>=n||a.eq(m).is(c)&&(e++,e==d))return l;m==n&&(m=-1)}}function ia(a,c){return a.slice(0,c.items.visible)}function za(a,
c,d){c.usePadding&&(v(d)||(d="_cfs_origCssMargin"),a.each(function(){var a=l(this),e=parseInt(a.css(c.d.marginRight),10);p(e)||(e=0);a.data(d,e)}))}function N(a,c,d){if(c.usePadding){var e=u(d)?d:!1;p(d)||(d=0);za(a,c,"_cfs_tempCssMargin");a.each(function(){var a=l(this);a.css(c.d.marginRight,e?a.data("_cfs_tempCssMargin"):d+a.data("_cfs_origCssMargin"))})}}function sa(a){a.each(function(){var a=l(this);a.data("_cfs_origCss",a.attr("style")||"")})}function Aa(a){a.each(function(){var a=l(this);a.attr("style",
a.data("_cfs_origCss")||"")})}function Ta(a,c){var d=a.items[a.d.width],e=a[a.d.height],A=ta(e);c.each(function(){var c=l(this),n=d-(c[a.d.outerWidth](!0)-c[a.d.width]());c[a.d.width](n);if(A)c[a.d.height](Ba(n,e))})}function Ca(a,c){var d=a.parent(),e=a.children(),l=ia(e,c),p=Da(Ea(l,c,!0),c,!1);d.css(p);if(c.usePadding){var d=c.padding,n=d[c.d[1]];c.align&&0>n&&(n=0);l=l.last();l.css(c.d.marginRight,l.data("_cfs_origCssMargin")+n);a.css(c.d.top,d[c.d[0]]);a.css(c.d.left,d[c.d[3]])}a.css(c.d.width,
p[c.d.width]+2*ca(e,c,"width"));a.css(c.d.height,Ua(e,c,"height"));return p}function Ea(a,c,d){return[ca(a,c,"width",d),Ua(a,c,"height",d)]}function Ua(a,c,d,e){u(e)||(e=!1);if(p(c[c.d[d]])&&e)return c[c.d[d]];if(p(c.items[c.d[d]]))return c.items[c.d[d]];d=-1<d.toLowerCase().indexOf("width")?"outerWidth":"outerHeight";return ua(a,c,d)}function ua(a,c,d){for(var e=0,l=0,p=a.length;l<p;l++){var n=a.eq(l),n=n.is(":visible")?n[c.d[d]](!0):0;e<n&&(e=n)}return e}function ca(a,c,d,e){u(e)||(e=!1);if(p(c[c.d[d]])&&
e)return c[c.d[d]];if(p(c.items[c.d[d]]))return c.items[c.d[d]]*a.length;d=-1<d.toLowerCase().indexOf("width")?"outerWidth":"outerHeight";for(var l=e=0,x=a.length;l<x;l++){var n=a.eq(l);e+=n.is(":visible")?n[c.d[d]](!0):0}return e}function Va(a,c,d){var e=a.is(":visible");e&&a.hide();c=a.parent()[c.d[d]]();e&&a.show();return c}function Wa(a,c,d){for(var e=!1,l=!1,p=0,n=a.length;p<n;p++){var h=a.eq(p),h=h.is(":visible")?h[c.d[d]](!0):0;!1===e?e=h:e!=h&&(l=!0);0==e&&(l=!0)}return l}function Ba(a,c){if(ta(c)){c=
parseInt(c.slice(0,-1),10);if(!p(c))return a;a*=c/100}return a}function e(a,c,d,e,l){u(d)||(d=!0);u(e)||(e=!0);u(l)||(l=!1);d&&(a=c.events.prefix+a);e&&(a=a+"."+c.events.namespace);e&&l&&(a+=c.serialNumber);return a}function E(a,c){return v(c.classnames[a])?c.classnames[a]:a}function Da(a,c,d){u(d)||(d=!0);d=c.usePadding&&d?c.padding:[0,0,0,0];var e={};e[c.d.width]=a[0]+d[1]+d[3];e[c.d.height]=a[1]+d[0]+d[2];return e}function M(a,c){for(var d=[],e=0,l=a.length;e<l;e++)for(var p=0,n=c.length;p<n;p++)if(-1<
c[p].indexOf(typeof a[e])&&w(d[p])){d[p]=a[e];break}return d}function bb(a){if(w(a))return[0,0,0,0];if(p(a))return[a,a,a,a];v(a)&&(a=a.split("px").join("").split("em").join("").split(" "));if(!K(a))return[0,0,0,0];for(var c=0;4>c;c++)a[c]=parseInt(a[c],10);switch(a.length){case 0:return[0,0,0,0];case 1:return[a[0],a[0],a[0],a[0]];case 2:return[a[0],a[1],a[0],a[1]];case 3:return[a[0],a[1],a[2],a[1]];default:return[a[0],a[1],a[2],a[3]]}}function Fa(a,c){var d=p(c[c.d.width])?Math.ceil(c[c.d.width]-
ca(a,c,"width")):0;switch(c.align){case "left":return[0,d];case "right":return[d,0];default:return[Math.ceil(d/2),Math.floor(d/2)]}}function Ga(a,c,d,e){c=a;if(t(d))c=d.call(e,c);else if(v(d)){c=d.split("+");var l=d.split("-");l.length>c.length?(d=!0,e=l[0],l=l[1]):(d=!1,e=c[0],l=c[1]);switch(e){case "even":c=1==a%2?a-1:a;break;case "odd":c=0==a%2?a-1:a;break;default:c=a}l=parseInt(l,10);p(l)&&(d&&(l=-l),c+=l)}if(!p(c)||1>c)c=1;return c}function aa(a,c,d,e){return Xa(Ga(a,c,d,e),c.items.visibleConf)}
function Xa(a,c){p(c.min)&&a<c.min&&(a=c.min);p(c.max)&&a>c.max&&(a=c.max);1>a&&(a=1);return a}function Ya(a){K(a)||(a=[[a]]);K(a[0])||(a=[a]);for(var c=0,d=a.length;c<d;c++)v(a[c][0])&&(a[c][0]=l(a[c][0])),u(a[c][1])||(a[c][1]=!0),u(a[c][2])||(a[c][2]=!0),p(a[c][3])||(a[c][3]=0);return a}function qa(a){return"right"==a?39:"left"==a?37:"up"==a?38:"down"==a?40:-1}function Za(a,c,d){a&&(c=c.triggerHandler(e("currentPosition",d)),l.fn.carouFredSel.cookie.set(a,c))}function cb(a){a=l.fn.carouFredSel.cookie.get(a);
return""==a?0:a}function $a(a,c){var d=Fa(ia(c,a),a);a.padding[a.d[1]]=d[1];a.padding[a.d[3]]=d[0];return a}function ab(a,c,d){d=Xa(Math.ceil(a[a.d.width]/a.items[a.d.width]),a.items.visibleConf);d>c.length&&(d=c.length);c=Math.floor(a[a.d.width]/d);a.items.visible=d;a.items[a.d.width]=c;a[a.d.width]=d*c;return a}function Z(a){if(v(a)){var c=-1<a.indexOf("immediate")?!0:!1;a=-1<a.indexOf("resume")?!0:!1}else c=a=!1;return[c,a]}function w(a){return null===a||"undefined"==typeof a||""===a||"undefined"===
a}function K(a){return a instanceof Array}function I(a){return a instanceof jQuery}function z(a){return(a instanceof Object||"object"==typeof a)&&null!==a&&!I(a)&&!K(a)&&!t(a)}function p(a){return(a instanceof Number||"number"==typeof a)&&!isNaN(a)}function v(a){return(a instanceof String||"string"==typeof a)&&!w(a)&&!ba(a)&&!(!1===a||"false"===a)}function t(a){return a instanceof Function||"function"==typeof a}function u(a){return a instanceof Boolean||"boolean"==typeof a||ba(a)||!1===a||"false"===
a}function ba(a){return!0===a||"true"===a}function ta(a){return v(a)&&"%"==a.slice(-1)}function J(){return(new Date).getTime()}function va(a,c){x(!0,a+" is DEPRECATED, support for it will be removed. Use "+c+" instead.")}function x(a,c){if(!w(window.console)&&!w(window.console.log)){if(z(a)){var d=" ("+a.selector+")";a=a.debug}else d="";if(!a)return!1;c=v(c)?"carouFredSel"+d+": "+c:["carouFredSel"+d+":",c];window.console.log(c)}return!1}l.fn.carouFredSel||(l.fn.caroufredsel=l.fn.carouFredSel=function(a,
c){if(0==this.length)return x(!0,'No element found for "'+this.selector+'".'),this;if(1<this.length)return this.each(function(){l(this).carouFredSel(a,c)});var d=this,m=this[0],A=!1;d.data("_cfs_isCarousel")&&(A=d.triggerHandler("_cfs_triggerEvent","currentPosition"),d.trigger("_cfs_triggerEvent",["destroy",!0]));var D={_init:function(a,c,k){var e=a=pa(m,a),f=a.items,f=pa(m,f);p(f)?f={visible:f}:"variable"==f?f={visible:f,width:f,height:f}:z(f)||(f={});e.items=f;e=a;f=a.scroll;f=pa(m,f);p(f)?f=50>=
f?{items:f}:{duration:f}:v(f)?f={easing:f}:z(f)||(f={});e.scroll=f;e=a;f=a.auto;f=xa(m,f);I(f)?f={button:f}:u(f)?f={play:f}:p(f)&&(f={timeoutDuration:f});f.progress&&(v(f.progress)||I(f.progress))&&(f.progress={bar:f.progress});e.auto=f;a.prev=Na(m,a.prev);a.next=Na(m,a.next);e=a;f=a.pagination;f=xa(m,f);I(f)?f={container:f}:u(f)&&(f={keys:f});e.pagination=f;e=a;f=a.swipe;t(f)&&(f=f.call(m));w(f)&&(f={onTouch:!1});ba(f)?f={onTouch:f}:p(f)&&(f={items:f});e.swipe=f;e=a;f=a.mousewheel;t(f)&&(f=f.call(m));
ba(f)?f={}:p(f)?f={items:f}:w(f)&&(f=!1);e.mousewheel=f;c&&(ja=l.extend(!0,{},l.fn.carouFredSel.defaults,a));a=b=l.extend(!0,{},l.fn.carouFredSel.defaults,a);c=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]];for(var e=c[0].length,f="right"==b.direction||"left"==b.direction?0:1,h={},s=0;s<e;s++)h[c[0][s]]=c[f][s];a.d=h;n.direction=
"up"==b.direction||"left"==b.direction?"next":"prev";a=d.children();c=Va(B,b,"width");ba(b.cookie)&&(b.cookie="caroufredsel_cookie_"+g.serialNumber);b.maxDimension=p(b[b.d.width])?b[b.d.width]:c;e=b;f=b.items;h=b;z(f.visibleConf)||(f.visibleConf={});z(f.sizesConf)||(f.sizesConf={});0==f.start&&p(k)&&(f.start=k);z(f.visible)?(f.visibleConf.min=f.visible.min,f.visibleConf.max=f.visible.max,f.visible=!1):v(f.visible)?("variable"==f.visible?f.visibleConf.variable=!0:f.visibleConf.adjust=f.visible,f.visible=
!1):t(f.visible)&&(f.visibleConf.adjust=f.visible,f.visible=!1);v(f.filter)||(f.filter=0<a.filter(":hidden").length?":visible":"*");f[h.d.width]||(h.responsive?(x(!0,"Set a "+h.d.width+" for the items!"),f[h.d.width]=ua(a,h,"outerWidth")):f[h.d.width]=Wa(a,h,"outerWidth")?"variable":a[h.d.outerWidth](!0));f[h.d.height]||(f[h.d.height]=Wa(a,h,"outerHeight")?"variable":a[h.d.outerHeight](!0));f.sizesConf.width=f.width;f.sizesConf.height=f.height;e.items=f;k=b;e=b.d.width;f=b[b.d.width];"auto"==f&&(f=
ua(a,b,"outerWidth"));k[e]=f;k=b;e=b.d.height;f=b[b.d.height];h=b;"auto"==f&&(f=ua(a,h,"outerHeight"));f||(f=h.items[h.d.height]);k[e]=f;b.responsive&&(ta(b[b.d.width])||(b[b.d.width]="100%"));ta(b[b.d.width])&&(n.upDateOnWindowResize=!0,n.primarySizePercentage=b[b.d.width],b[b.d.width]=Ba(c,n.primarySizePercentage),b.items.visible||(b.items.visibleConf.variable=!0));b.responsive?(b.usePadding=!1,b.padding=[0,0,0,0],b.align=!1,b.items.visibleConf.variable=!1):(b.items.visible||(k=b,"variable"==k.items[k.d.width]&&
(k.items.visibleConf.variable=!0),!k.items.visibleConf.variable&&(p(k[k.d.width])?k.items.visible=Math.floor(k[k.d.width]/k.items[k.d.width]):(k.items.visible=Math.floor(c/k.items[k.d.width]),k[k.d.width]=k.items.visible*k.items[k.d.width],k.items.visibleConf.adjust||(k.align=!1)),"Infinity"==k.items.visible||1>k.items.visible)&&(x(!0,'Not a valid number of visible items: Set to "variable".'),k.items.visibleConf.variable=!0),b=k),b[b.d.width]||(!b.items.visibleConf.variable&&p(b.items[b.d.width])&&
"*"==b.items.filter?(b[b.d.width]=b.items.visible*b.items[b.d.width],b.align=!1):b[b.d.width]="variable"),w(b.align)&&(b.align=p(b[b.d.width])?"center":!1),b.items.visibleConf.variable&&(b.items.visible=da(a,b,0)));"*"==b.items.filter||b.items.visibleConf.variable||(b.items.visibleConf.org=b.items.visible,b.items.visible=ra(a,b,0));b.items.visible=aa(b.items.visible,b,b.items.visibleConf.adjust,m);b.items.visibleConf.old=b.items.visible;if(b.responsive)b.items.visibleConf.min||(b.items.visibleConf.min=
b.items.visible),b.items.visibleConf.max||(b.items.visibleConf.max=b.items.visible),b=ab(b,a,c);else switch(b.padding=bb(b.padding),"top"==b.align?b.align="left":"bottom"==b.align&&(b.align="right"),b.align){case "center":case "left":case "right":"variable"!=b[b.d.width]&&(b=$a(b,a),b.usePadding=!0);break;default:b.align=!1,b.usePadding=0==b.padding[0]&&0==b.padding[1]&&0==b.padding[2]&&0==b.padding[3]?!1:!0}p(b.scroll.duration)||(b.scroll.duration=500);w(b.scroll.items)&&(b.scroll.items=b.responsive||
b.items.visibleConf.variable||"*"!=b.items.filter?"visible":b.items.visible);b.auto=l.extend(!0,{},b.scroll,b.auto);b.prev=l.extend(!0,{},b.scroll,b.prev);b.next=l.extend(!0,{},b.scroll,b.next);b.pagination=l.extend(!0,{},b.scroll,b.pagination);k=b;a=b.auto;t(a.button)&&(a.button=a.button.call(m));v(a.button)&&(a.button=l(a.button));u(a.play)||(a.play=!0);p(a.delay)||(a.delay=0);w(a.pauseOnEvent)&&(a.pauseOnEvent=!0);u(a.pauseOnResize)||(a.pauseOnResize=!0);p(a.timeoutDuration)||(a.timeoutDuration=
10>a.duration?2500:5*a.duration);a.progress&&(t(a.progress.bar)&&(a.progress.bar=a.progress.bar.call(m)),v(a.progress.bar)&&(a.progress.bar=l(a.progress.bar)),a.progress.bar?(t(a.progress.updater)||(a.progress.updater=l.fn.carouFredSel.progressbarUpdater),p(a.progress.interval)||(a.progress.interval=50)):a.progress=!1);k.auto=a;b.prev=Oa(m,b.prev);b.next=Oa(m,b.next);k=b;a=b.pagination;t(a.container)&&(a.container=a.container.call(m));v(a.container)&&(a.container=l(a.container));p(a.items)||(a.items=
!1);u(a.keys)||(a.keys=!1);t(a.anchorBuilder)||(!1===a.anchorBuilder||"false"===a.anchorBuilder)||(a.anchorBuilder=l.fn.carouFredSel.pageAnchorBuilder);p(a.deviation)||(a.deviation=0);k.pagination=a;k=b;a=b.swipe;u(a.onTouch)||(a.onTouch=!0);u(a.onMouse)||(a.onMouse=!1);z(a.options)||(a.options={});u(a.options.triggerOnTouchEnd)||(a.options.triggerOnTouchEnd=!1);k.swipe=a;b.mousewheel=b.mousewheel;b.synchronise&&(b.synchronise=Ya(b.synchronise));b.auto.onPauseStart&&(b.auto.onTimeoutStart=b.auto.onPauseStart,
va("auto.onPauseStart","auto.onTimeoutStart"));b.auto.onPausePause&&(b.auto.onTimeoutPause=b.auto.onPausePause,va("auto.onPausePause","auto.onTimeoutPause"));b.auto.onPauseEnd&&(b.auto.onTimeoutEnd=b.auto.onPauseEnd,va("auto.onPauseEnd","auto.onTimeoutEnd"));b.auto.pauseDuration&&(b.auto.timeoutDuration=b.auto.pauseDuration,va("auto.pauseDuration","auto.timeoutDuration"))},_build:function(){d.data("_cfs_isCarousel",!0);for(var a=d.children(),c="textAlign float position top right bottom left zIndex width height marginTop marginRight marginBottom marginLeft".split(" "),
e={},h=0,f=c.length;h<f;h++)e[c[h]]=d.css(c[h]);c="relative";switch(e.position){case "absolute":case "fixed":c=e.position}"parent"==g.wrapper?sa(B):B.css(e);B.css({overflow:"hidden",position:c});sa(d);d.data("_cfs_origCssZindex",e.zIndex);d.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0});za(a,b);sa(a);b.responsive&&Ta(b,a)},_bind_events:function(){D._unbind_events();d.bind(e("stop",g),function(a,
c){a.stopPropagation();n.isStopped||b.auto.button&&b.auto.button.addClass(E("stopped",g));n.isStopped=!0;b.auto.play&&(b.auto.play=!1,d.trigger(e("pause",g),c));return!0});d.bind(e("finish",g),function(b){b.stopPropagation();n.isScrolling&&na(r);return!0});d.bind(e("pause",g),function(a,d,c){a.stopPropagation();C=ga(C);d&&n.isScrolling&&(r.isStopped=!0,a=J()-r.startTime,r.duration-=a,r.pre&&(r.pre.duration-=a),r.post&&(r.post.duration-=a),na(r,!1));n.isPaused||n.isScrolling||!c||(C.timePassed+=J()-
C.startTime);n.isPaused||b.auto.button&&b.auto.button.addClass(E("paused",g));n.isPaused=!0;b.auto.onTimeoutPause&&(c=b.auto.timeoutDuration-C.timePassed,a=100-Math.ceil(100*c/b.auto.timeoutDuration),b.auto.onTimeoutPause.call(m,a,c));return!0});d.bind(e("play",g),function(a,c,k,h){a.stopPropagation();C=ga(C);h=M([c,k,h],["string","number","boolean"]);c=h[0];k=h[1];h=h[2];"prev"!=c&&"next"!=c&&(c=n.direction);p(k)||(k=0);u(h)||(h=!1);h&&(n.isStopped=!1,b.auto.play=!0);if(!b.auto.play)return a.stopImmediatePropagation(),
x(g,"Carousel stopped: Not scrolling.");n.isPaused&&b.auto.button&&(b.auto.button.removeClass(E("stopped",g)),b.auto.button.removeClass(E("paused",g)));n.isPaused=!1;C.startTime=J();var f=b.auto.timeoutDuration+k;dur2=f-C.timePassed;perc=100-Math.ceil(100*dur2/f);b.auto.progress&&(C.progress=setInterval(function(){var a=J()-C.startTime+C.timePassed,a=Math.ceil(100*a/f);b.auto.progress.updater.call(b.auto.progress.bar[0],a)},b.auto.progress.interval));C.auto=setTimeout(function(){b.auto.progress&&
b.auto.progress.updater.call(b.auto.progress.bar[0],100);b.auto.onTimeoutEnd&&b.auto.onTimeoutEnd.call(m,perc,dur2);n.isScrolling?d.trigger(e("play",g),c):d.trigger(e(c,g),b.auto)},dur2);b.auto.onTimeoutStart&&b.auto.onTimeoutStart.call(m,perc,dur2);return!0});d.bind(e("resume",g),function(b){b.stopPropagation();r.isStopped?(r.isStopped=!1,n.isPaused=!1,n.isScrolling=!0,r.startTime=J(),fa(r,g)):d.trigger(e("play",g));return!0});d.bind(e("prev",g)+" "+e("next",g),function(a,c,k,q,f){a.stopPropagation();
if(n.isStopped||d.is(":hidden"))return a.stopImmediatePropagation(),x(g,"Carousel stopped or hidden: Not scrolling.");var y=p(b.items.minimum)?b.items.minimum:b.items.visible+1;if(y>h.total)return a.stopImmediatePropagation(),x(g,"Not enough items ("+h.total+" total, "+y+" needed): Not scrolling.");var s=M([c,k,q,f],["object","number/string","function","boolean"]);c=s[0];k=s[1];q=s[2];f=s[3];y=a.type.slice(g.events.prefix.length);z(c)||(c={});t(q)&&(c.onAfter=q);u(f)&&(c.queue=f);c=l.extend(!0,{},
b[y],c);if(c.conditions&&!c.conditions.call(m,y))return a.stopImmediatePropagation(),x(g,'Callback "conditions" returned false.');if(!p(k)){if("*"!=b.items.filter)k="visible";else{var T=[k,c.items,b[y].items],s=0;for(f=T.length;s<f;s++)if(p(T[s])||"page"==T[s]||"visible"==T[s]){k=T[s];break}}switch(k){case "page":return a.stopImmediatePropagation(),d.triggerHandler(e(y+"Page",g),[c,q]);case "visible":b.items.visibleConf.variable||"*"!=b.items.filter||(k=b.items.visible)}}if(r.isStopped)return d.trigger(e("resume",
g)),d.trigger(e("queue",g),[y,[c,k,q]]),a.stopImmediatePropagation(),x(g,"Carousel resumed scrolling.");if(0<c.duration&&n.isScrolling)return c.queue&&("last"==c.queue&&(Y=[]),"first"==c.queue&&0!=Y.length||d.trigger(e("queue",g),[y,[c,k,q]])),a.stopImmediatePropagation(),x(g,"Carousel currently scrolling.");C.timePassed=0;d.trigger(e("slide_"+y,g),[c,k]);if(b.synchronise)for(a=b.synchronise,c=[c,k],q=0,f=a.length;q<f;q++)s=y,a[q][2]||(s="prev"==s?"next":"prev"),a[q][1]||(c[0]=a[q][0].triggerHandler("_cfs_triggerEvent",
["configuration",s])),c[1]=k+a[q][3],a[q][0].trigger("_cfs_triggerEvent",["slide_"+s,c]);return!0});d.bind(e("slide_prev",g),function(a,c,k){a.stopPropagation();var q=d.children();if(!b.circular&&0==h.first)return b.infinite&&d.trigger(e("next",g),h.total-1),a.stopImmediatePropagation();N(q,b);if(!p(k)){if(b.items.visibleConf.variable)k=ya(q,b,h.total-1);else if("*"!=b.items.filter){var f=p(c.items)?c.items:Qa(d,b);k=Pa(q,b.items.filter,f,h.total-1)}else k=b.items.visible;k=Ga(k,b,c.items,m)}b.circular||
h.total-k<h.first&&(k=h.total-h.first);b.items.visibleConf.old=b.items.visible;b.items.visibleConf.variable?(f=aa(da(q,b,h.total-k),b,b.items.visibleConf.adjust,m),b.items.visible+k<=f&&k<h.total&&(k++,f=aa(da(q,b,h.total-k),b,b.items.visibleConf.adjust,m)),b.items.visible=f):"*"!=b.items.filter&&(f=ra(q,b,h.total-k),b.items.visible=aa(f,b,b.items.visibleConf.adjust,m));N(q,b,!0);if(0==k)return a.stopImmediatePropagation(),x(g,"0 items to scroll: Not scrolling.");x(g,"Scrolling "+k+" items backward.");
for(h.first+=k;h.first>=h.total;)h.first-=h.total;b.circular||(0==h.first&&c.onEnd&&c.onEnd.call(m,"prev"),b.infinite||ha(b,h.first,g));d.children().slice(h.total-k,h.total).prependTo(d);h.total<b.items.visible+k&&d.children().slice(0,b.items.visible+k-h.total).clone(!0).appendTo(d);var q=d.children(),y=q.slice(k,b.items.visibleConf.old+k);a=q.slice(0,b.items.visible);var s=q.eq(k-1),T=y.last(),u=a.last();N(q,b);var t=f=0;b.align&&(t=Fa(a,b),f=t[0],t=t[1]);var v=0>f?b.padding[b.d[3]]:0,$=!1,O=l();
if(b.items.visible<k&&(O=q.slice(b.items.visibleConf.old,k),"directscroll"==c.fx)){var A=b.items[b.d.width],$=O,s=u;Ja($);b.items[b.d.width]="variable"}var Q=!1,w=ca(q.slice(0,k),b,"width"),z=Da(Ea(a,b,!0),b,!b.usePadding),D=0,ea={},I={},ka={},E={},J={},K={},U={},L=Ma(c,b,k,w);switch(c.fx){case "cover":case "cover-fade":D=ca(q.slice(0,b.items.visible),b,"width")}$&&(b.items[b.d.width]=A);N(q,b,!0);0<=t&&N(T,b,b.padding[b.d[1]]);0<=f&&N(s,b,b.padding[b.d[3]]);b.align&&(b.padding[b.d[1]]=t,b.padding[b.d[3]]=
f);K[b.d.left]=-(w-v);U[b.d.left]=-(D-v);I[b.d.left]=z[b.d.width];var R=function(){},q=function(){},V=function(){},A=function(){},F=function(){},v=function(){},G=function(){},w=function(){},H=function(){},S=function(){},W=function(){};switch(c.fx){case "crossfade":case "cover":case "cover-fade":case "uncover":case "uncover-fade":Q=d.clone(!0).appendTo(B)}switch(c.fx){case "crossfade":case "uncover":case "uncover-fade":Q.children().slice(0,k).remove();Q.children().slice(b.items.visibleConf.old).remove();
break;case "cover":case "cover-fade":Q.children().slice(b.items.visible).remove(),Q.css(U)}d.css(K);r=ma(L,c.easing,g);ea[b.d.left]=b.usePadding?b.padding[b.d[3]]:0;if("variable"==b[b.d.width]||"variable"==b[b.d.height])R=function(){B.css(z)},q=function(){r.anims.push([B,z])};if(b.usePadding){u.not(s).length&&(ka[b.d.marginRight]=s.data("_cfs_origCssMargin"),0>f?s.css(ka):(G=function(){s.css(ka)},w=function(){r.anims.push([s,ka])}));switch(c.fx){case "cover":case "cover-fade":Q.children().eq(k-1).css(ka)}u.not(T).length&&
(E[b.d.marginRight]=T.data("_cfs_origCssMargin"),V=function(){T.css(E)},A=function(){r.anims.push([T,E])});0<=t&&(J[b.d.marginRight]=u.data("_cfs_origCssMargin")+b.padding[b.d[1]],F=function(){u.css(J)},v=function(){r.anims.push([u,J])})}var W=function(){d.css(ea)},M=b.items.visible+k-h.total,S=function(){0<M&&(d.children().slice(h.total).remove(),y=l(d.children().slice(h.total-(b.items.visible-M)).get().concat(d.children().slice(0,M).get())));Ka($);if(b.usePadding){var a=d.children().eq(b.items.visible+
k-1);a.css(b.d.marginRight,a.data("_cfs_origCssMargin"))}},P=La(y,O,a,k,"prev",L,z),H=function(){Ha(d,Q,c);n.isScrolling=!1;X.onAfter=oa(m,c,"onAfter",P,X);Y=Ia(d,Y,g);n.isPaused||d.trigger(e("play",g))};n.isScrolling=!0;C=ga(C);X.onBefore=oa(m,c,"onBefore",P,X);switch(c.fx){case "none":d.css(ea);R();V();F();G();W();S();H();break;case "fade":r.anims.push([d,{opacity:0},function(){R();V();F();G();W();S();r=ma(L,c.easing,g);r.anims.push([d,{opacity:1},H]);fa(r,g)}]);break;case "crossfade":d.css({opacity:0});
r.anims.push([Q,{opacity:0}]);r.anims.push([d,{opacity:1},H]);q();V();F();G();W();S();break;case "cover":r.anims.push([Q,ea,function(){V();F();G();W();S();H()}]);q();break;case "cover-fade":r.anims.push([d,{opacity:0}]);r.anims.push([Q,ea,function(){V();F();G();W();S();H()}]);q();break;case "uncover":r.anims.push([Q,I,H]);q();V();F();G();W();S();break;case "uncover-fade":d.css({opacity:0});r.anims.push([d,{opacity:1}]);r.anims.push([Q,I,H]);q();V();F();G();W();S();break;default:r.anims.push([d,ea,
function(){S();H()}]),q(),A(),v(),w()}fa(r,g);Za(b.cookie,d,g);d.trigger(e("updatePageStatus",g),[!1,z]);return!0});d.bind(e("slide_next",g),function(a,c,k){a.stopPropagation();var q=d.children();if(!b.circular&&h.first==b.items.visible)return b.infinite&&d.trigger(e("prev",g),h.total-1),a.stopImmediatePropagation();N(q,b);if(!p(k)){if("*"!=b.items.filter){var f=p(c.items)?c.items:Qa(d,b);k=Sa(q,b.items.filter,f+1,0,b.circular)-1}else k=b.items.visible;k=Ga(k,b,c.items,m)}var y=0==h.first?h.total:
h.first;if(!b.circular){if(b.items.visibleConf.variable)var s=da(q,b,k),f=ya(q,b,y-1);else f=s=b.items.visible;k+s>y&&(k=y-f)}b.items.visibleConf.old=b.items.visible;if(b.items.visibleConf.variable){for(s=aa(Ra(q,b,k,y),b,b.items.visibleConf.adjust,m);b.items.visible-k>=s&&k<h.total;)k++,s=aa(Ra(q,b,k,y),b,b.items.visibleConf.adjust,m);b.items.visible=s}else"*"!=b.items.filter&&(s=ra(q,b,k),b.items.visible=aa(s,b,b.items.visibleConf.adjust,m));N(q,b,!0);if(0==k)return a.stopImmediatePropagation(),
x(g,"0 items to scroll: Not scrolling.");x(g,"Scrolling "+k+" items forward.");for(h.first-=k;0>h.first;)h.first+=h.total;b.circular||(h.first==b.items.visible&&c.onEnd&&c.onEnd.call(m,"next"),b.infinite||ha(b,h.first,g));h.total<b.items.visible+k&&d.children().slice(0,b.items.visible+k-h.total).clone(!0).appendTo(d);q=d.children();a=q.slice(0,b.items.visibleConf.old);var t=q.slice(k,b.items.visible+k),u=q.eq(k-1),v=a.last(),y=t.last();N(q,b);var A=f=0;b.align&&(s=Fa(t,b),f=s[0],A=s[1]);var $=!1,
s=l();if(b.items.visibleConf.old<k&&(s=q.slice(b.items.visibleConf.old,k),"directscroll"==c.fx)){var O=b.items[b.d.width],$=s,u=v;Ja($);b.items[b.d.width]="variable"}var w=!1,z=ca(q.slice(0,k),b,"width"),D=Da(Ea(t,b,!0),b,!b.usePadding),I=0,E={},J={},L={},M={},K={},P=Ma(c,b,k,z);switch(c.fx){case "uncover":case "uncover-fade":I=ca(q.slice(0,b.items.visibleConf.old),b,"width")}$&&(b.items[b.d.width]=O);b.align&&0>b.padding[b.d[1]]&&(b.padding[b.d[1]]=0);N(q,b,!0);N(v,b,b.padding[b.d[1]]);b.align&&
(b.padding[b.d[1]]=A,b.padding[b.d[3]]=f);K[b.d.left]=b.usePadding?b.padding[b.d[3]]:0;var Z=function(){},O=function(){},U=function(){},ba=function(){},R=function(){},V=function(){},F=function(){},G=function(){},H=function(){};switch(c.fx){case "crossfade":case "cover":case "cover-fade":case "uncover":case "uncover-fade":w=d.clone(!0).appendTo(B),w.children().slice(b.items.visibleConf.old).remove()}switch(c.fx){case "crossfade":case "cover":case "cover-fade":d.css("zIndex",1),w.css("zIndex",0)}r=
ma(P,c.easing,g);E[b.d.left]=-z;J[b.d.left]=-I;0>f&&(E[b.d.left]+=f);if("variable"==b[b.d.width]||"variable"==b[b.d.height])Z=function(){B.css(D)},O=function(){r.anims.push([B,D])};b.usePadding&&(z=y.data("_cfs_origCssMargin"),0<=A&&(z+=b.padding[b.d[1]]),y.css(b.d.marginRight,z),u.not(v).length&&(M[b.d.marginRight]=v.data("_cfs_origCssMargin")),U=function(){v.css(M)},ba=function(){r.anims.push([v,M])},y=u.data("_cfs_origCssMargin"),0<f&&(y+=b.padding[b.d[3]]),L[b.d.marginRight]=y,R=function(){u.css(L)},
V=function(){r.anims.push([u,L])});var H=function(){d.css(K)},S=b.items.visible+k-h.total,G=function(){0<S&&d.children().slice(h.total).remove();var a=d.children().slice(0,k).appendTo(d).last();0<S&&(t=ia(q,b));Ka($);if(b.usePadding){if(h.total<b.items.visible+k){var c=d.children().eq(b.items.visible-1);c.css(b.d.marginRight,c.data("_cfs_origCssMargin")+b.padding[b.d[1]])}a.css(b.d.marginRight,a.data("_cfs_origCssMargin"))}},W=La(a,s,t,k,"next",P,D),F=function(){d.css("zIndex",d.data("_cfs_origCssZindex"));
Ha(d,w,c);n.isScrolling=!1;X.onAfter=oa(m,c,"onAfter",W,X);Y=Ia(d,Y,g);n.isPaused||d.trigger(e("play",g))};n.isScrolling=!0;C=ga(C);X.onBefore=oa(m,c,"onBefore",W,X);switch(c.fx){case "none":d.css(E);Z();U();R();H();G();F();break;case "fade":r.anims.push([d,{opacity:0},function(){Z();U();R();H();G();r=ma(P,c.easing,g);r.anims.push([d,{opacity:1},F]);fa(r,g)}]);break;case "crossfade":d.css({opacity:0});r.anims.push([w,{opacity:0}]);r.anims.push([d,{opacity:1},F]);O();U();R();H();G();break;case "cover":d.css(b.d.left,
B[b.d.width]());r.anims.push([d,K,F]);O();U();R();G();break;case "cover-fade":d.css(b.d.left,B[b.d.width]());r.anims.push([w,{opacity:0}]);r.anims.push([d,K,F]);O();U();R();G();break;case "uncover":r.anims.push([w,J,F]);O();U();R();H();G();break;case "uncover-fade":d.css({opacity:0});r.anims.push([d,{opacity:1}]);r.anims.push([w,J,F]);O();U();R();H();G();break;default:r.anims.push([d,E,function(){H();G();F()}]),O(),ba(),V()}fa(r,g);Za(b.cookie,d,g);d.trigger(e("updatePageStatus",g),[!1,D]);return!0});
d.bind(e("slideTo",g),function(a,c,k,l,f,m,n){a.stopPropagation();a=M([c,k,l,f,m,n],"string/number/object number boolean object string function".split(" "));f=a[3];m=a[4];n=a[5];c=P(a[0],a[1],a[2],h,d);if(0==c)return!1;z(f)||(f=!1);"prev"!=m&&"next"!=m&&(m=b.circular?c<=h.total/2?"next":"prev":0==h.first||h.first>c?"next":"prev");"prev"==m&&(c=h.total-c);d.trigger(e(m,g),[f,c,n]);return!0});d.bind(e("prevPage",g),function(a,b,c){a.stopPropagation();a=d.triggerHandler(e("currentPage",g));return d.triggerHandler(e("slideToPage",
g),[a-1,b,"prev",c])});d.bind(e("nextPage",g),function(a,b,c){a.stopPropagation();a=d.triggerHandler(e("currentPage",g));return d.triggerHandler(e("slideToPage",g),[a+1,b,"next",c])});d.bind(e("slideToPage",g),function(a,c,k,l,f){a.stopPropagation();p(c)||(c=d.triggerHandler(e("currentPage",g)));a=b.pagination.items||b.items.visible;var m=Math.ceil(h.total/a)-1;0>c&&(c=m);c>m&&(c=0);return d.triggerHandler(e("slideTo",g),[c*a,0,!0,k,l,f])});d.bind(e("jumpToStart",g),function(a,b){a.stopPropagation();
b=b?P(b,0,!0,h,d):0;b+=h.first;if(0!=b){if(0<h.total)for(;b>h.total;)b-=h.total;d.prepend(d.children().slice(b,h.total))}return!0});d.bind(e("synchronise",g),function(a,c){a.stopPropagation();if(c)c=Ya(c);else if(b.synchronise)c=b.synchronise;else return x(g,"No carousel to synchronise.");for(var k=d.triggerHandler(e("currentPosition",g)),h=!0,f=0,l=c.length;f<l;f++)c[f][0].triggerHandler(e("slideTo",g),[k,c[f][3],!0])||(h=!1);return h});d.bind(e("queue",g),function(a,b,c){a.stopPropagation();t(b)?
b.call(m,Y):K(b)?Y=b:w(b)||Y.push([b,c]);return Y});d.bind(e("insertItem",g),function(a,c,k,m,f){a.stopPropagation();f=M([c,k,m,f],["string/object","string/number/object","boolean","number"]);c=f[0];k=f[1];m=f[2];f=f[3];z(c)&&!I(c)?c=l(c):v(c)&&(c=l(c));if(!I(c)||0==c.length)return x(g,"Not a valid object.");w(k)&&(k="end");za(c,b);sa(c);a=k;var n="before";"end"==k?m?(0==h.first?(k=h.total-1,n="after"):(k=h.first,h.first+=c.length),0>k&&(k=0)):(k=h.total-1,n="after"):k=P(k,f,m,h,d);f=d.children().eq(k);
if(f.length)f[n](c);else x(g,"Correct insert-position not found! Appending item to the end."),d.append(c);"end"!=a&&!m&&k<h.first&&(h.first+=c.length);h.total=d.children().length;h.first>=h.total&&(h.first-=h.total);d.trigger(e("updateSizes",g));d.trigger(e("linkAnchors",g));return!0});d.bind(e("removeItem",g),function(a,b,c,m){a.stopPropagation();a=M([b,c,m],["string/number/object","boolean","number"]);b=a[0];c=a[1];m=a[2];if(b instanceof l&&1<b.length)return f=l(),b.each(function(a,b){var h=d.trigger(e("removeItem",
g),[l(this),c,m]);h&&(f=f.add(h))}),f;if(w(b)||"end"==b)f=d.children().last();else{b=P(b,m,c,h,d);var f=d.children().eq(b);f.length&&b<h.first&&(h.first-=f.length)}f&&f.length&&(f.detach(),h.total=d.children().length,d.trigger(e("updateSizes",g)));return f});d.bind(e("onBefore",g)+" "+e("onAfter",g),function(a,b){a.stopPropagation();var c=a.type.slice(g.events.prefix.length);K(b)&&(X[c]=b);t(b)&&X[c].push(b);return X[c]});d.bind(e("currentPosition",g),function(b,a){b.stopPropagation();var c=0==h.first?
0:h.total-h.first;t(a)&&a.call(m,c);return c});d.bind(e("currentPage",g),function(a,c){a.stopPropagation();var d=b.pagination.items||b.items.visible,e=Math.ceil(h.total/d-1),d=0==h.first?0:h.first<h.total%d?0:h.first!=d||b.circular?Math.round((h.total-h.first)/d):e;0>d&&(d=0);d>e&&(d=e);t(c)&&c.call(m,d);return d});d.bind(e("currentVisible",g),function(a,c){a.stopPropagation();var e=ia(d.children(),b);t(c)&&c.call(m,e);return e});d.bind(e("slice",g),function(a,b,c,e){a.stopPropagation();if(0==h.total)return!1;
e=M([b,c,e],["number","number","function"]);b=p(e[0])?e[0]:0;c=p(e[1])?e[1]:h.total;e=e[2];b+=h.first;c+=h.first;if(0<items.total){for(;b>h.total;)b-=h.total;for(;c>h.total;)c-=h.total;for(;0>b;)b+=h.total;for(;0>c;)c+=h.total}a=d.children();b=c>b?a.slice(b,c):l(a.slice(b,h.total).get().concat(a.slice(0,c).get()));t(e)&&e.call(m,b);return b});d.bind(e("isPaused",g)+" "+e("isStopped",g)+" "+e("isScrolling",g),function(b,a){b.stopPropagation();var c=b.type.slice(g.events.prefix.length),c=n[c];t(a)&&
a.call(m,c);return c});d.bind(e("configuration",g),function(a,c,k,h){a.stopPropagation();a=!1;if(t(c))c.call(m,b);else if(z(c))ja=l.extend(!0,{},ja,c),!1!==k?a=!0:b=l.extend(!0,{},b,c);else if(!w(c))if(t(k))c=eval("opts."+c),w(c)&&(c=""),k.call(m,c);else{if(w(k))return eval("opts."+c);"boolean"!==typeof h&&(h=!0);eval("opts_orig."+c+" = b");!1!==h?a=!0:eval("opts."+c+" = b")}a&&(N(d.children(),b),D._init(ja),D._bind_buttons(),k=Ca(d,b),d.trigger(e("updatePageStatus",g),[!0,k]));return b});d.bind(e("linkAnchors",
g),function(b,a,c){b.stopPropagation();w(a)?a=l("body"):v(a)&&(a=l(a));if(!I(a)||0==a.length)return x(g,"Not a valid object.");v(c)||(c="a.caroufredsel");a.find(c).each(function(){var a=this.hash||"";0<a.length&&-1!=d.children().index(l(a))&&l(this).unbind("click").click(function(b){b.preventDefault();d.trigger(e("slideTo",g),a)})});return!0});d.bind(e("updatePageStatus",g),function(a,c,k){a.stopPropagation();if(b.pagination.container){var m=b.pagination.items||b.items.visible,f=Math.ceil(h.total/
m);c&&(b.pagination.anchorBuilder&&(b.pagination.container.children().remove(),b.pagination.container.each(function(){for(var a=0;a<f;a++){var c=d.children().eq(P(a*m,0,!0,h,d));l(this).append(b.pagination.anchorBuilder.call(c[0],a+1))}})),b.pagination.container.each(function(){l(this).children().unbind(b.pagination.event).each(function(a){l(this).bind(b.pagination.event,function(c){c.preventDefault();d.trigger(e("slideTo",g),[a*m,-b.pagination.deviation,!0,b.pagination])})})}));var n=d.triggerHandler(e("currentPage",
g))+b.pagination.deviation;n>=f&&(n=0);0>n&&(n=f-1);b.pagination.container.each(function(){l(this).children().removeClass(E("selected",g)).eq(n).addClass(E("selected",g))});return!0}});d.bind(e("updateSizes",g),function(a){a=b.items.visible;var c=d.children(),k=Va(B,b,"width");h.total=c.length;n.primarySizePercentage?(b.maxDimension=k,b[b.d.width]=Ba(k,n.primarySizePercentage)):b.maxDimension=p(b[b.d.width])?b[b.d.width]:k;b.responsive?(b.items.width=b.items.sizesConf.width,b.items.height=b.items.sizesConf.height,
b=ab(b,c,k),a=b.items.visible,Ta(b,c)):b.items.visibleConf.variable?a=da(c,b,0):"*"!=b.items.filter&&(a=ra(c,b,0));!b.circular&&(0!=h.first&&a>h.first)&&(k=b.items.visibleConf.variable?ya(c,b,h.first)-h.first:"*"!=b.items.filter?Pa(c,b.items.filter,b.items.visibleConf.org,h.first)-h.first:b.items.visible-h.first,x(g,"Preventing non-circular: sliding "+k+" items backward."),d.trigger(e("prev",g),k));b.items.visible=aa(a,b,b.items.visibleConf.adjust,m);b.items.visibleConf.old=b.items.visible;b=$a(b,
c);a=Ca(d,b);d.trigger(e("updatePageStatus",g),[!0,a]);wa(b,h.total,g);ha(b,h.first,g);return a});d.bind(e("destroy",g),function(a,b){a.stopPropagation();C=ga(C);d.data("_cfs_isCarousel",!1);d.trigger(e("finish",g));b&&d.trigger(e("jumpToStart",g));Aa(d.children());Aa(d);D._unbind_events();D._unbind_buttons();"parent"==g.wrapper?Aa(B):B.replaceWith(d);return!0});d.bind(e("debug",g),function(a){x(g,"Carousel width: "+b.width);x(g,"Carousel height: "+b.height);x(g,"Item widths: "+b.items.width);x(g,
"Item heights: "+b.items.height);x(g,"Number of items visible: "+b.items.visible);b.auto.play&&x(g,"Number of items scrolled automatically: "+b.auto.items);b.prev.button&&x(g,"Number of items scrolled backward: "+b.prev.items);b.next.button&&x(g,"Number of items scrolled forward: "+b.next.items);return g.debug});d.bind("_cfs_triggerEvent",function(a,b,c){a.stopPropagation();return d.triggerHandler(e(b,g),c)})},_unbind_events:function(){d.unbind(e("",g));d.unbind(e("",g,!1));d.unbind("_cfs_triggerEvent")},
_bind_buttons:function(){D._unbind_buttons();wa(b,h.total,g);ha(b,h.first,g);if(b.auto.pauseOnHover){var a=Z(b.auto.pauseOnHover);B.bind(e("mouseenter",g,!1),function(){d.trigger(e("pause",g),a)}).bind(e("mouseleave",g,!1),function(){d.trigger(e("resume",g))})}b.auto.button&&b.auto.button.bind(e(b.auto.event,g,!1),function(a){a.preventDefault();a=!1;var c=null;n.isPaused?a="play":b.auto.pauseOnEvent&&(a="pause",c=Z(b.auto.pauseOnEvent));a&&d.trigger(e(a,g),c)});b.prev.button&&(b.prev.button.bind(e(b.prev.event,
g,!1),function(a){a.preventDefault();d.trigger(e("prev",g))}),b.prev.pauseOnHover&&(a=Z(b.prev.pauseOnHover),b.prev.button.bind(e("mouseenter",g,!1),function(){d.trigger(e("pause",g),a)}).bind(e("mouseleave",g,!1),function(){d.trigger(e("resume",g))})));b.next.button&&(b.next.button.bind(e(b.next.event,g,!1),function(a){a.preventDefault();d.trigger(e("next",g))}),b.next.pauseOnHover&&(a=Z(b.next.pauseOnHover),b.next.button.bind(e("mouseenter",g,!1),function(){d.trigger(e("pause",g),a)}).bind(e("mouseleave",
g,!1),function(){d.trigger(e("resume",g))})));b.pagination.container&&b.pagination.pauseOnHover&&(a=Z(b.pagination.pauseOnHover),b.pagination.container.bind(e("mouseenter",g,!1),function(){d.trigger(e("pause",g),a)}).bind(e("mouseleave",g,!1),function(){d.trigger(e("resume",g))}));(b.prev.key||b.next.key)&&l(document).bind(e("keyup",g,!1,!0,!0),function(a){var c=a.keyCode;c==b.next.key&&(a.preventDefault(),d.trigger(e("next",g)));c==b.prev.key&&(a.preventDefault(),d.trigger(e("prev",g)))});b.pagination.keys&&
l(document).bind(e("keyup",g,!1,!0,!0),function(a){var c=a.keyCode;49<=c&&58>c&&(c=(c-49)*b.items.visible,c<=h.total&&(a.preventDefault(),d.trigger(e("slideTo",g),[c,0,!0,b.pagination])))});if(l.fn.swipe){var c="ontouchstart"in window;if(c&&b.swipe.onTouch||!c&&b.swipe.onMouse){var k=l.extend(!0,{},b.prev,b.swipe),m=l.extend(!0,{},b.next,b.swipe),c=function(){d.trigger(e("prev",g),[k])},f=function(){d.trigger(e("next",g),[m])};switch(b.direction){case "up":case "down":b.swipe.options.swipeUp=f;b.swipe.options.swipeDown=
c;break;default:b.swipe.options.swipeLeft=f,b.swipe.options.swipeRight=c}n.swipe&&d.swipe("destroy");B.swipe(b.swipe.options);B.css("cursor","move");n.swipe=!0}}if(l.fn.mousewheel&&b.mousewheel){var p=l.extend(!0,{},b.prev,b.mousewheel),r=l.extend(!0,{},b.next,b.mousewheel);n.mousewheel&&B.unbind(e("mousewheel",g,!1));B.bind(e("mousewheel",g,!1),function(a,b){a.preventDefault();0<b?d.trigger(e("prev",g),[p]):d.trigger(e("next",g),[r])});n.mousewheel=!0}b.auto.play&&d.trigger(e("play",g),b.auto.delay);
if(n.upDateOnWindowResize){var t=function(a){d.trigger(e("finish",g));b.auto.pauseOnResize&&!n.isPaused&&d.trigger(e("play",g));N(d.children(),b);d.trigger(e("updateSizes",g))},u=l(window),c=null;if(l.debounce&&"debounce"==g.onWindowResize)c=l.debounce(200,t);else if(l.throttle&&"throttle"==g.onWindowResize)c=l.throttle(300,t);else var v=0,w=0,c=function(){var a=u.width(),b=u.height();if(a!=v||b!=w)t(),v=a,w=b};u.bind(e("resize",g,!1,!0,!0),c)}},_unbind_buttons:function(){e("",g);var a=e("",g,!1);
ns3=e("",g,!1,!0,!0);l(document).unbind(ns3);l(window).unbind(ns3);B.unbind(a);b.auto.button&&b.auto.button.unbind(a);b.prev.button&&b.prev.button.unbind(a);b.next.button&&b.next.button.unbind(a);b.pagination.container&&(b.pagination.container.unbind(a),b.pagination.anchorBuilder&&b.pagination.container.children().remove());n.swipe&&(d.swipe("destroy"),B.css("cursor","default"),n.swipe=!1);n.mousewheel&&(n.mousewheel=!1);wa(b,"hide",g);ha(b,"removeClass",g)}};u(c)&&(c={debug:c});var n={direction:"next",
isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},h={total:d.children().length,first:0},C={auto:null,progress:null,startTime:J(),timePassed:0},r={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},X={onBefore:[],onAfter:[]},Y=[],g=l.extend(!0,{},l.fn.carouFredSel.configs,c),b={},ja=l.extend(!0,{},a),B="parent"==g.wrapper?d.parent():d.wrap("<"+g.wrapper.element+' class="'+g.wrapper.classname+'" />').parent();g.selector=d.selector;g.serialNumber=l.fn.carouFredSel.serialNumber++;g.transition=
g.transition&&l.fn.transition?"transition":"animate";D._init(ja,!0,A);D._build();D._bind_events();D._bind_buttons();K(b.items.start)?A=b.items.start:(A=[],0!=b.items.start&&A.push(b.items.start));b.cookie&&A.unshift(parseInt(cb(b.cookie),10));if(0<A.length)for(var la=0,qa=A.length;la<qa;la++){var L=A[la];if(0!=L){if(!0===L){if(L=window.location.hash,1>L.length)continue}else"random"===L&&(L=Math.floor(Math.random()*h.total));if(d.triggerHandler(e("slideTo",g),[L,0,!0,{fx:"none"}]))break}}A=Ca(d,b);
la=ia(d.children(),b);b.onCreate&&b.onCreate.call(m,{width:A.width,height:A.height,items:la});d.trigger(e("updatePageStatus",g),[!0,A]);d.trigger(e("linkAnchors",g));g.debug&&d.trigger(e("debug",g));return d},l.fn.carouFredSel.serialNumber=1,l.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},l.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",
events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},l.fn.carouFredSel.pageAnchorBuilder=function(a){return'<a href="#"><span>'+a+"</span></a>"},l.fn.carouFredSel.progressbarUpdater=function(a){l(this).css("width",a+"%")},l.fn.carouFredSel.cookie={get:function(a){a+="=";for(var c=document.cookie.split(";"),d=0,e=c.length;d<e;d++){for(var l=c[d];" "==l.charAt(0);)l=l.slice(1);if(0==l.indexOf(a))return l.slice(a.length)}return 0},set:function(a,
c,d){var e="";d&&(e=new Date,e.setTime(e.getTime()+864E5*d),e="; expires="+e.toGMTString());document.cookie=a+"="+c+e+"; path=/"},remove:function(a){l.fn.carouFredSel.cookie.set(a,"",-1)}},l.extend(l.easing,{quadratic:function(a){var c=a*a;return a*(-c*a+4*c-6*a+4)},cubic:function(a){return a*(4*a*a-9*a+6)},elastic:function(a){var c=a*a;return a*(33*c*c-106*c*a+126*c-67*a+15)}}))})(jQuery);
